package com.dq.Mapper;

import com.dq.Pojo.Homework;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface HomeworkMapper {
    void add(Homework homework);

    void update(Homework homework);

    List<Homework> findAll( @Param("cid") Integer classId,@Param("couid") Integer courseId,@Param("name") String name, @Param("type") String type);

    void delete(Integer id);

    List<Homework> findByid(@Param("cid") Integer classid,@Param("couid") Integer courseid);

    @Select("select  * from homework where homeworkid=#{id}")
    Homework getByid(Integer id);
}
